package com.dianjing.dianqun.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dianjing.dianqun.common.base.CrudService;
import com.dianjing.dianqun.dao.ContentCollectionMapper;
import com.dianjing.dianqun.model.ContentCollection;

/**
 * @date : 2017年11月3日
 * 
 * @author: baoyongtao
 * 
 * @see :
 * 
 */
@Service
@Transactional
public class ContentCollectionService extends CrudService<ContentCollectionMapper, ContentCollection> {

	@Autowired
	private ContentCollectionMapper collectionMapper;

	public ContentCollection selectByPrimaryKey(Integer userId, Integer contentId) {
		return collectionMapper.selectByPrimaryKey(userId,contentId);
	}

	@Transactional(readOnly=false)
	public void cancelCollection(Integer userId, Integer contentId) {
		collectionMapper.cancelCollection(userId,contentId);
	}
}
